<template>
  <div id="asset-management" class="component-wrap">
    <Title :title-msg="titleMsg"></Title>
    <Select :select-length="selectLength"></Select>
    <div class="asset-list">
      <List v-for="(item,index) in lists" :key="index" :item="item"></List>
    </div>
    <router-link to="/home/compile">
      <img src="../assets/ic_add@3x.png" class="add" />
    </router-link>
  </div>
</template>

<script type="text/ecmascript-6">
  import Title from '@/components/common/Title.vue'
  import Select from '@/components/common/Select.vue'
  import List from '@/components/common/List.vue'

  const list= {
    "assetCode": "0281219-1223",
    "assetName": "戴尔台式机",
    "assetType": "办公用品",
    "assetGroup": "电脑一体机",
    "assetOri": "聚好联产品开发",
    "assetPosition": "青岛市崂山区松岭路399号",
    "assetStatus": 1
  }

  export default {
    name: "assetManagement",
    data:function(){
      return {
        lists: [ list, list, list, list, list, list ],
        titleMsg: {
          title: "资产管理",
          back: true,
          scan: true,
          search: true
        }
      }
    },
    computed: {
      selectLength:function(){
        return this.lists.length
      }
    },
    methods: {
      goBack:function(){
        this.$router.go(-1);
      },
    },
    components: {
      List: List,
      Title: Title,
      Select: Select
    }
  }
</script>

<style scoped>
  #asset-management .asset-list {
    position: fixed;
    top: 11rem;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: auto;
  }
</style>
